#ifndef WAYLANWINDOWMANAGER_H
#define WAYLANWINDOWMANAGER_H

#include "ukuiwindowmanager.h"

#include <KWayland/Client/plasmawindowmanagement.h>
#include <QSocketNotifier>
#include <QMutex>
#include <KWayland/Client/registry.h>

class WaylanWindowManager : public UKUIWindowManager
{
    Q_OBJECT
public:
    explicit WaylanWindowManager(UKUIWindowManager *parent = nullptr);
    ~ WaylanWindowManager();

signals:

protected:
    void addWindow(KWayland::Client::PlasmaWindow* window);
    //void removeWindow();

private slots:
    void slotCloseableChanged();
private:
    void init();

    void showWindows();

    KWayland::Client::PlasmaWindowManagement *windowManagement;
    struct wl_display *m_display = nullptr;
    int m_fd = -1;
    KWayland::Client::Registry *m_registry = nullptr;
    KWayland::Client::EventQueue *m_eventQueue = nullptr;

    QSocketNotifier *m_socketNotifier = nullptr;
    QMutex m_mutex;

};

#endif // WAYLANWINDOWMANAGER_H
